package com.mall.client.server.mapper;

import java.util.List;

import com.mall.client.server.domain.Client;
import com.mall.client.server.domain.Coupon;
import com.mall.client.server.domain.Points;
import com.mall.client.server.domain.UserCouponMiddle;
import com.mall.client.server.domain.vo.ClientVo;
import com.mall.client.server.domain.vo.FreezeVo;
import com.mall.client.server.domain.vo.VipVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 客户Mapper接口
 *
 * @author ruoyi
 * @date 2025-02-16
 */
@Mapper
public interface ClientMapper
{
    /**
     * 查询客户
     *
     * @param id 客户主键
     * @return 客户
     */
    public Client selectClientById(Integer id);

    /**
     * 查询客户列表
     *
     * @param client 客户
     * @return 客户集合
     */
    public List<ClientVo> selectClientList(Client client);

    /**
     * 新增客户
     *
     * @param client 客户
     * @return 结果
     */
    public int insertClient(Client client);

    /**
     * 修改客户
     *
     * @param client 客户
     * @return 结果
     */
    public int updateClient(Client client);

    /**
     * 删除客户
     *
     * @param id 客户主键
     * @return 结果
     */
    public int deleteClientById(Integer id);

    /**
     * 批量删除客户
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteClientByIds(Integer[] ids);

    Coupon selectCouponById(Long couponId);

    void middleAdds(@Param("id") Integer id, @Param("clientTagId") Integer[] clientTagId);

    void updateCurrentPoints(Points points);

    List<Coupon> selectCouponList();

    void addVipToCustomer(VipVo vipVo);

    List<FreezeVo> selectFreezeAll();

    void middleAddSvipIds(@Param("id") Integer id, @Param("svipIds") Integer[] svipIds);

    void middleAddFreezeIds(@Param("id") Integer id, @Param("clientFreezeIds") Integer[] clientFreezeIds);

    void userCouponAdd(@Param("userId") String userId, @Param("couponId") String couponId);
}
